extends ../layout

block content
  .container
    each category in categories
      .row
        .panel.panel-default
          .panel-heading.text-center
            h3
              a(href='/results?category='+category._id+'&page=1') #{category.name}
          .panelbody.clearfix
            if category && category.movies.length > 0
              each item in category.movies
                .col-md-2
                  .thumbnail
                    a(href="/movie/" + item._id)
                      img(src=item.poster, alt=item.title)
                  .caption
                    h3= item.title
                    p: a.btn.btn-primary(href="/movie/"+item._id, role="button")
                      |观看预告片
              br

